<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<c:set var="baseurl" value="${pageContext.request.contextPath}/"></c:set>
<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<html>
<head>
    <title>jQuery Bootstrap打开多个标签页面代码</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="<%=path%>/CSS/bootstrap.css">
    <link rel="stylesheet" href="<%=path%>/CSS/b.tabs.css" type="text/css">
    <link rel="stylesheet" type="text/css" href="<%=path%>/easyUI1.4.1/themes/default/easyui.css">
    <!-- 图标资源 -->
    <link rel="stylesheet" type="text/css" href="<%=path%>/easyUI1.4.1/themes/icon.css">
    <style type="text/css">

        body {
            min-width: 16px;
            max-height: 700px
        }

        .leftmenu {
            width: 250px;
            margin: 0;
            padding: 0
        }

        .title {
            font-weight: bold;
            background: #3b4966;
            height: 48px;
            line-height: 48px;
            font-size: 16px;
            color: #a9bbe0;
            border-bottom: 1px solid #4f5c76;
            padding-left: 60px;
            cursor: pointer
        }

        a, a:focus {
            color: #fff;
            font-size: 14px;
            height: 30px
        }

        a:hover {
            color: #57a0ff;
            text-decoration: none
        }

        .menuson li {
            padding-left: 40px;
            height: 30px;
            line-height: 30px;
            cursor: pointer;
        }

        .head {
            margin: 20px 6px;
            background: #fff;
            min-height: 530px;
            box-shadow: 0 0 5px #cccccc;
            border-radius: 5px;
        }

        .head-detail {
            width: 250px;
            float: left;
            height: 120px;
            margin: 30px 30px;
            margin-bottom: 0px
        }

        .box img {
            cursor: pointer;
            float: left;
            height: 120px;
            width: 250px
        }

        .head-content {
            float: left;
            margin-right: 23px
        }

        .bottom {
            float: left;
            height: 80px;
            width: 100%;
            margin-left: 40px;
            line-height: 80px;
            font-size: 16px
        }

        .bottom span {
            font-size: 14px
        }

        .bottom a {
            color: #57a0ff;
            padding-left: 20px;
            cursor: pointer;
            font-size: 14px
        }

        .head-detail:hover {
            -moz-transform: translate(0px, -15px);
            -webkit-transform: translate(0px, -15px);
            -ms-transform: translate(0px, -15px);
            -webkit-transition: all 0.7s linear;
            -moz-transition: all 0.7s linear;
            -o-transition: all 0.7s linear;
            -ms-transition: all 0.7s linear;
            transition: all 0.7s linear;
        }

        ul li {
            list-style: none
        }

        .admin {
            width: 300px;
            height: 45px;
            line-height: 45px;
            color: #99bdec;
            padding-right: 40px;
            float: right;
        }
        .l-btn-text{
            color: #000000;
        }
        .admin a {
            cursor: pointer;
            color: #99bdec;
        }

        .group {
            width: 315px;
            height: 40px;
            line-height: 40px;
            color: #444444;
            padding-left: 15px;
            float: left;
        }

        .admin-bottom {
            position: fixed;
            bottom: 0;
            background: #3c4351;
            width: 100%;
            z-index: 99;
        }

        .message-box {
            position: fixed;
            width: 300px;
            height: 185px;
            line-height: 60px;
            box-shadow: 1px 2px 3px #cccccc;
            border: 1px solid #cccccc;
            border-radius: 4px;
            text-align: center;
            color: #cccccc;
            z-index: 101;
            float: right;
            bottom: 55px;
            right: 200px;
            /*     margin-right: 108px; */
            display: none;
        }

        .triangle-border {
            position: absolute;
            left: 30px;
            overflow: hidden;
            width: 0;
            height: 0;
            border-width: 10px;
            border-style: solid dashed dashed dashed;
            z-index: 101;
        }

        input[type=Password] {
            float: left;
            zoom: 1;
            outline: medium;
            font-size: 14px;
            width: 95%;
            background-color: #f2f2f2
        }

        cite {
            background: #a9bbe0;
            padding-left: 60px;
            background: url(<%=path%>/images/index/sjxmr.png) no-repeat;
            background-position: 30px 4px;
        }

        .menuson li.active cite {
            padding-left: 40px;
            background: url(<%=path%>/images/index/sjxdj.png) no-repeat;
            margin-top: 11px;
            display: block;
            float: left;
            margin-left: 32px;
            width: 16px;
            height: 16px;
        }

        .menuson li {
            list-style: none
        }

        .menuson li.active {
            background: url(<%=path%>/images/index/libag.jpg) no-repeat;
            padding-left: 9px;
        }

        .selIcon {
            float: right;
            padding-top: 20px;
            padding-right: 20px;
        }

        .leftmenu dd:first-child .menuson {
            display: none;
        }

        .type {
            padding-left: 15px
        }

        .menuson {
            background: #34425e;
        }

        .menuson li.active a {
            display: block;
            color: #34425e;
            font-size: 14px;
            padding-left: 15px
        }

        .leftmenu dd {
            background: url(<%=path%>/images/leftmenubg.gif) repeat-x;
            line-height: 35px;
            font-weight: bold;
            font-size: 14px;
            border-right: solid 1px #b7d5df;
        }

        /* 设置滚动条的样式 */
        ::-webkit-scrollbar {
            width: 5px;
        }

        /* 滚动槽 */
        ::-webkit-scrollbar-track {
            -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
            border-radius: 10px;
        }

        /* 滚动条滑块 */
        ::-webkit-scrollbar-thumb {
            border-radius: 10px;
            background: rgba(0, 0, 0, 0.1);
            -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
        }

        ::-webkit-scrollbar-thumb:window-inactive {
            background: rgba(255, 0, 0, 0.4);
        }

        .well {
            border: none
        }

        /*滚动条样式*/
        .innerbox::-webkit-scrollbar { /*滚动条整体样式*/
            width: 4px; /*高宽分别对应横竖滚动条的尺寸*/
            height: 4px;
        }

        .innerbox::-webkit-scrollbar-thumb { /*滚动条里面小方块*/
            border-radius: 5px;
            -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
            background: rgba(0, 0, 0, 0.2);
        }

        .innerbox::-webkit-scrollbar-track { /*滚动条里面轨道*/
            -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
            border-radius: 0;
            background: rgba(0, 0, 0, 0.1);
        }

        * {
            margin: 0;
            padding: 0
        }

        div.menuSideBar {
        }

        div.menuSideBar li.nav-header {
            font-size: 14px;
            padding: 3px 15px;
        }

        div.menuSideBar .nav-list > li > a, div.menuSideBar .dropdown-menu li a {
            -webkit-border-radius: 0px;
            -moz-border-radius: 0px;
            -ms-border-radius: 0px;
            border-radius: 0px;
        }
        * {
            margin: 0;
            padding: 0;
        }
        .bTabs div.tab-content {
            margin-right: 0;
        }
    </style>
    <!--[if IE 11]>
    <style type="text/css">
        /* 针对IE6定义的样式 */
        .bTabs button.navTabsCloseBtn{
            top: 0;
            float: none;
        }
    </style>
    <![endif]-->
    <!--[if IE 1 0]>
    <style type="text/css">
        /* 针对IE6定义的样式 */
        .bTabs button.navTabsCloseBtn{
            top: 0;
            float: none;
        }
    </style>
    <![endif]-->
</head>
<body style="background: #f5f5f5">

<div class="content">
    <div class="container" style="width: 100%;padding-left: 0;">
        <div class="">
            <div class="row-fluid">
               <%-- <div class="col-md-2" style="padding: 0px;width: 15%;background: #3b4966;min-height:100px">
                    <div class="well menuSideBar" style="padding: 0px 0px;">
                        <ul class="nav nav-list" class="menuSideBar">
                            <c:forEach items="${menus}" var="menu" varStatus="m">
                            <dd>
                                <div class="title"><span
                                        style="padding-top: 3px"><img></span>&nbsp;&nbsp;${menu.menuName}<img
                                        class="selIcon" src="/images/index/xx.png"></div>
                                <c:if test="${menu.children ne null}">
                                    <ul class="menuson" style="display: none">
                                        <c:forEach items="${menu.children}" var="menuNav" varStatus="s">
                                            <c:choose>
                                                <c:when test="${menuNav.children ne null }">
                                                    <li class="showi"><cite></cite><a
                                                            href="javascript:;">${menuNav.menuName}</a></li>
                                                    <ul class="type" style="display: none;">
                                                        <c:forEach items="${menuNav.children}" var="menuNavs"
                                                                   varStatus="s">
                                                            <li style="padding-left: 65px" mid="tab${menuNavs.id}"
                                                                funurl="<%=path%>/DrivingSys${menuNavs.menuUrl}">
                                                                <a>${menuNavs.menuName}</a>
                                                            </li>
                                                        </c:forEach>
                                                    </ul>
                                                </c:when>
                                                <c:otherwise>
                                                    <li mid="tab${menuNav.id}"
                                                        funurl="<%=path%>/DrivingSys${menuNav.menuUrl}">
                                                        <cite></cite><a>${menuNav.menuName} </a><i></i>
                                                    </li>
                                                </c:otherwise>
                                            </c:choose>

                                        </c:forEach>
                                    </ul>
                                </c:if>
                            </dd>
                            </c:forEach>
                                <dd style="background: #3b4966;height:60px">

                                </dd>
                    </div>
                </div>--%>
                <div class="col-md-10" id="mainFrameTabs" style="padding : 0px;width: 100%">

                    <!-- Nav tabs -->
                    <ul class="nav nav-tabs" role="tablist">
                        <li role="presentation" class="active noclose"><a href="#bTabs_navTabsMainPage"
                                                                          data-toggle="tab">首页</a></li>
                    </ul>

                    <!-- Tab panes -->
                    <div class="tab-content" >
                        <div class="tab-pane active" id="bTabs_navTabsMainPage">
                            <div class="well menuSideBar" style="padding: 0px 0px;">
                                <ul class="nav nav-list" class="menuSideBar">
                                    <div class="head">
                                        <div class="head-content">
                                            <c:forEach var="indexMenu" items="${indexMenu}" varStatus="status">
                                            <c:choose>
                                            <c:when test="${status.count == 1}">
                                            <ul>
                                                <li>
                                                    <div class="head-detail">
                                                        <div class="box">
                                                            <ul>
                                                                <li mid="tab${indexMenu.id}"
                                                                    funurl="<%=path%>/DrivingSys${indexMenu.menuUrl}">
                                                                    <img onclick="toSelectCard(this)" src="${indexMenu.imgUrl}">
                                                                    <a style="display: none">${indexMenu.menuName}</a>
                                                                </li>
                                                            </ul>
                                                        </div>
                                                    </div>
                                                    </c:when>
                                                    <c:when test="${fn:length(list) == status.count }">
                                                    <div class="head-detail">
                                                        <div class="box">
                                                            <ul>
                                                                <li mid="tab${indexMenu.id}"
                                                                    funurl="<%=path%>/DrivingSys${indexMenu.menuUrl}">
                                                                    <img onclick="toSelectCard(this)"  src="${indexMenu.imgUrl}">
                                                                    <a style="display: none">${indexMenu.menuName}</a>
                                                                </li>
                                                            </ul>
                                                        </div>
                                                    </div>
                                                </li>
                                            </ul>
                                            </c:when>
                                            <c:when test="${status.count % 3 == 0}">
                                            <div class="head-detail">
                                                <div class="box">
                                                    <ul>
                                                        <li mid="tab${indexMenu.id}"
                                                            funurl="<%=path%>/DrivingSys${indexMenu.menuUrl}">
                                                            <img onclick="toSelectCard(this)" src="${indexMenu.imgUrl}">
                                                            <a style="display: none">${indexMenu.menuName}</a>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </div>
                                            </li>
                                            <li>
                                                </c:when>
                                                <c:otherwise>
                                                <div class="head-detail">
                                                    <div class="box">
                                                        <ul>
                                                            <li style="height: 120px; width: 250px;"
                                                                mid="tab${indexMenu.id}"
                                                                funurl="<%=path%>/DrivingSys${indexMenu.menuUrl}">
                                                                <img onclick="toSelectCard(this)" src="${indexMenu.imgUrl}">
                                                                <a style="display: none">${indexMenu.menuName}</a>
                                                            </li>
                                                        </ul>
                                                    </div>
                                                </div>

                                                </c:otherwise>
                                                </c:choose>

                                                </c:forEach>

                                        </div>

                                        <div class="bottom">
                                            <ul>
                                                <li style="float: left">
	            <span>最近访问：
	            <c:forEach items="${oftenMenu}" var="oftenMenu" varStatus="status">
                                                <li style="margin-left: 20px;padding:0px 10px 0 10px; float: left" mid="tab${oftenMenu.id}"
                                                    funurl="<%=path%>/DrivingSys${oftenMenu.menuUrl}">
                                                    <a style="padding-left: 5px">${oftenMenu.menuName}</a>
                                                </li>
                                                </c:forEach>
                                                </span>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                </ul>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
    <div id="company_window_div" class="easyui-window user_set_windows" title="选择公司"
         data-options="modal:true,closed:true,collapsible:false,minimizable:false,
			maximizable:false,iconCls:'icon-save',top:120
            ,onClose: function () {document.body.style.overflow = 'visible';}"
         style="width:500px;height:265px;display:none">
        <div style="height:262px;width:488px">
            <table id="company_list_table" toolbar="#company_bar">
            </table>
            <div id="company_bar" style="background-color: #f5f5f5;padding:5px 10px">
                <label style="margin:5px 5px 0 10px ;font-size:14px;float:left">公司名称：</label>
                <input type="text" class="easyui-validatebox" placeholder="请输入公司名称" id="company_name_input"
                       style="width:150px;height:27px;margin-right:20px;"/>
                <input type="button" value="立即搜索" onclick="CompanyPage()"
                       style="cursor:pointer;background-color: #54a0ff;color: #fff;border-radius:20px;padding:5px 20px"/>
            </div>
        </div>
    </div>
</div>
</body>
</html>
    <script type="text/javascript" src="<%=path%>/common/jquery.min.js"></script>
    <script type="text/javascript" src="<%=path%>/common/bootstrap.min.js"></script>
    <script type="text/javascript" src="<%=path%>/common/b.tabs.js"></script>
    <script type="text/javascript" src="<%=path%>/common/select-card.js"></script>
    <script type="text/javascript" src="<%=path%>/easyUI1.4.1/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="<%=path%>/easyUI1.4.1/locale/easyui-lang-zh_CN.js"></script>

    <script>
        $(document).ready(function () {
               $('.tab-content').css('height',$(document).height()-50)
            $(window).resize(function () {          //当浏览器大小变化时
                $('.tab-content').css('height',$(document).height()-50)
            });
            
        })
        //IE不支持console对象，此代码仅为测试使用
        ///////////////////////////////////////
        /*$(document).ready(function () {

            $(function(){

                      $.ajax({
                            url:'http://localhost:8080/DrivingSys/left/getUserMenu.action',
                            type: "post",
                            dataType:"json",
                            data:{},
                            success: function(json) {
                                var date1=new Date();  //开始时间
                                var tmp=[];
                                tmp = tree(json,tmp,1);
                                var str = '';
                                for(var i =0;i<tmp.length;i++){
                                    if(tmp[i].leavel == 1){
                                        var menuImg = tmp[i].imgUrl;
                                        if(menuImg == null || menuImg == 'null'){
                                            str+='<dd><div class="title"><span style="padding-top: 3px">'+
                                                '<img  /></span>&nbsp;&nbsp;'+tmp[i].menuName+'<img class="selIcon"src="<%=path%>/images/index/xx.png" /></div>';
                                }else{
                                    str+='<dd><div class="title"><span style="padding-top: 3px">'+
                                        '<img src="'+menuImg+'" style="width:20px;height:20px" /></span>&nbsp;&nbsp;'+tmp[i].menuName+'<img class="selIcon" src="<%=path%>/images/index/xx.png" /></div>';
                                }
                            }else if(tmp[i].leavel == 2){
                                //子菜单
                                if(tmp[i].menuType == 'nav'){
                                    //上一个菜单是子菜单 加li
                                    if(tmp[i-1].menuType == 'nav'){
                                        str+='<li><cite></cite><a href="<%=path%>/DrivingSys'
                                            + tmp[i].menuUrl + '" target="rightFrame">    ' + tmp[i].menuName + '</a><i></i></li>';
                                    }else{

                                        str+='<ul class="menuson"><li mid="tab4" funurl="http://218.65.105.108:9040/DrivingSys/DrivingSys'+tmp[i].menuUrl+'"><a tabindex="-1" href="javascript:void(0);">'+tmp[i].menuName+'</a></li>';
                                    }
                                    //最后一个
                                    if(i==tmp.length-1){
                                        str+='</ul></dd></dl>';
                                    }else{
                                        //判断下一个菜单是否是子菜单
                                        if(tmp[i+1].menuType == 'sys'){
                                            //如果下一个父菜单是二级菜单关闭当前。
                                            if(tmp[i+1].leavel == 2){
                                                str+='</ul>';
                                            }else{
                                                str+='</ul></dd>';
                                            }

                                        }
                                    }
                                    //'</dd>';
                                }else{
                                    if(tmp[i-1].menuType == 'sys'){
                                        //如果下一个父菜单是二级菜单关闭当前。
                                        if(tmp[i-1].leavel != 3){
                                            str+='<ul class="menuson">';
                                        }

                                    }
                                    str+='<li class="showi"><cite></cite><a href="javascript:;" target="rightFrame">'+tmp[i].menuName+'</a></li>'
                                }


                            }else if(tmp[i].leavel == 3){
                                if(tmp[i-1].menuType == 'nav'){
                                    str+='<li ><a href="<%=path%>/DrivingSys'+tmp[i].menuUrl
                                        +'" target="rightFrame">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+tmp[i].menuName+'</a></li>';
                                }else{

                                    str+='<ul class="type"><li mid="tab4" funurl="http://218.65.105.108:9040/DrivingSys/DrivingSys'+tmp[i].menuUrl+'"><a tabindex="-1" href="javascript:void(0);">'+tmp[i].menuName+'</a></li>';
                                }
                                //最后一个
                                if(i==tmp.length-1){
                                    str+='</ul></ul></dd>';
                                }else{
                                    //判断下一个菜单是否是子菜单
                                    if(tmp[i+1].menuType == 'sys'){
                                        if(tmp[i+1].leavel == 2){
                                            str+='</ul>';
                                        }else{
                                            str+='</ul></ul></dd>';
                                        }
                                    }else{
                                        if(tmp[i+1].parentId != tmp[i].parentId){
                                            str+='</ul>';
                                        }
                                    }
                                }
                            }
                            //if(tmp[i].menuType == '')
                        }
                        ////////////////////////////////////
                        //插入//
                        ////////////////////////////////////
                        $("#menu_list_id").append(str);
                        var date2=new Date();    //结束时间
                        var date3=date2.getTime()-date1.getTime()  //时间差的毫秒数*
                        ////////////////////////////////////
                        ////为菜单添加点击事件////
                        ////////////////////////////////////
                        //二级菜单



                        /!* parentWindow.setWindow.rows="80,*,45";*!/
                        var date4=new Date();    //结束时间
                        var date5=date4.getTime()-date1.getTime()  //时间差的毫秒数
                        var framHeight = window.parent.frames["leftFrame"].frameElement.contentWindow.document.documentElement.scrollHeight*1;
                        if(document.body.scrollHeight*1 > framHeight){
                            framHeight = document.body.scrollHeight;
                        }
                        $("#btn_id").removeClass("hideClass");
                        //$("#setDivBtn_id").css("height",(window.screen.availHeight-300)+"px");
                        $("#setDivBtn_id").css("height",framHeight+"px");

                        $("#btn_id").css("top",(window.screen.availHeight-300)/2+"px");
                        /!*  parentWindow.setyou1.cols="285,*";*!/
                        /!* $(parent.frames["rightFrame"].document).find(".head").fadeToggle()
                         $(parent.frames["rightFrame"].document).find(".loading").fadeToggle()*!/
                        /!*alert($(parent.frames["rightFrame"].document).find(".head").show())*!/
                    },error:function(){
                    }

                });

            })
})*/
        $('.title').click(function () {
            var $ul = $(this).next('ul');
            $('dd').find('ul').slideUp();
            $('.selIcon').attr("src", '<%=path%>/images/index/xx.png');
            if ($ul.is(':visible')) {
                $(this).next('ul').slideUp();
                $(this).find(".selIcon").attr("src", '<%=path%>/images/index/xx.png');
            } else {
                $(this).find(".selIcon").attr("src", '<%=path%>/images/index/xs.png');
                $(this).next('ul').slideDown();
            }
        });
        //三级菜单
        $('.showi').click(function () {
            $(".menuson li.active").removeClass("active")
            $(this).addClass("active");
            var $ul = $(this).next();
            if ($ul.is(':visible')) {
                $(".type").hide();
                $(this).next('ul').slideUp();
            } else {
                $(".type").hide();
                $(this).next('ul').slideDown();
            }
        });

        //二级菜单
        $(".menuson li a:not('.showi a')").click(function () {
            $(".menuson li.active").removeClass("active")
            $(this).parent().addClass("active");
        });

        /*
	   * 待办事项提示框
	   */
        function showMessageAlert(){
            $.messager.confirm('提示', '您有未办事项是否马上办理？', function (r) {
                if (!r) {
                    return;
                }
                goToMessage('tab1001','消息中心','<%=path%>/DrivingSys/item/page.action')
               /* window.parent.frames["rightFrame"].location.href="<%=path%>/DrivingSys/item/page.action";*/
            });
            //window.parent.isShowMessageAlert();
        }

        var right_company_flag = false;
        //设置 session中的公司信息
        /*           function setCompany(companyID,companyName){
                       $.ajax({
                             url:'${baseurl}right/setCompany.action',
		      type: "post",
		      dataType:"json",
		      data:{"companyID":companyID,"companyName":companyName},
		      success: function(json) {
		    	  if(json.success == undefined ||json.success == 'undefined' ){
			        	$.messager.alert('提示','设置组织失败','warning');
		          }else{
		    	  	$("#bottom_Company_a_id").text(companyName);
		    	  	$('.message-box').hide();
		          }
		      },
		      error: function(){
		    	  $.messager.alert('提示','请刷新页面重试','warning');
		      }
    	});

    }*/
        //跳转
        function inIndexMenu(url) {
            console.log("${baseurl}DrivingSys" + url)
            window.parent.frames["rightFrame"].location.href = "${baseurl}DrivingSys" + url;
        }

        $('.admin-detail').click(function () {
            $('.message-box').toggle();
        });

        //打开公司搜索窗口
        function ajaxJSP_searchCompany() {
            //清除用户checked项
            //$('#company_list_table').datagrid('clearSelections');
            $("#company_window_div").attr("style", "width:500px;height:265px;");
            $('#company_window_div').window('open');
            $('#company_window_div').window('center');
            CompanyPage();
        }

        //公司分页查询
        function CompanyPage() {
            $('.loading').hide();
            if (right_company_flag) {
                var patrn = /[!#@$%^&*()_+<>?:"{},\/;'[\]]/;
                if (patrn.test($('#company_name_input').val())) {
                    $.messager.alert('提示', '请不要使用非中文符号!');
                    return true;
                }
                //保留页码查询
                $('#company_list_table').datagrid('reload', {
                    company: $('#company_name_input').val()
                });
            } else {
                $("#company_list_table").datagrid({
                    url: '${baseurl}DrivingSys/common/company.action',  //数据来源
                    //冻结列
                    columns: [[
                        {field: 'ck', checkbox: true, width: 30},  //复选框
                        {field: 'companyName', title: '公司名称', width: 420, align: 'center'}
                    ]],
                    fitColumns: false,//自适应宽度，占满,不能和冻结列同时设置成true
                    fit: true,//充满屏幕
                    striped: true,   //斑马线效果
                    rownumbers: true,            //显示行号
                    idField: 'fid',    //主键列
                    singleSelect: true,          //是否单选
                    cache: true,				//关闭缓存
                    method: 'post',
                    pagination: true,
                    pageList: [10, 20, 50, 100],//每页行数选择列表
                    pageSize: 20, //设置默认初始的每页行数rows
                    pageNumber: 1,//设置默认初始的页码page
                    multiSort: true,
                    onClickRow: function (index, row) {
                        $.messager.confirm('提示', '是否为将组织设置为<b>' + row.companyName + '</b>?', function (r) {
                            if (!r) {
                                return;
                            }
                            var selRow = $('#company_list_table').datagrid('getSelections')[0];
                            //底部公司设置
                            window.parent.parent.frames['bottomFrame'].setCompany(row.fid, row.companyName, row.flongnumber);
                            //重置顶部个人消息。
                            window.parent.parent.frames['topFrame'].top_setMessage_Flag();
                            $('#company_window_div').window('close');
                            location.href = "${baseurl}DrivingSys/right.action";
                        });
                    },
                    onLoadSuccess: function () {
                        right_company_flag = true;
                        $('#company_list_table').datagrid('clearSelections');
                        document.body.style.overflow = "hidden"; //隐藏滚动条
                    }, loadMsg: '请稍候...'

                });
            }
        }

        $('.del').click(function () {
            $('.message-box').hide();
        })

        //启用停用滚动条
        function openOrCloseOverflow(flag) {
            if (flag) {
                document.body.style.overflow = "hidden"; //隐藏滚动条
            } else {
                document.body.style.overflow = "visible"; //显示滚动条
            }
        }

        /**
         * 强制浏览器重新计算高度
         */
        function resizeScreen() {
            var conentHeight = $('.tab-content').height() + 1 + 'px'
            $('.tab-content').css('height',conentHeight)
        }

        function goToMessage(menuId,title,url) {
            $('#mainFrameTabs').bTabsAdd(menuId,title,url);
        }
        function closeSelectCard() {
            var caed_id = $('.active #caed_id').attr('href')
            $('#mainFrameTabs').bTabsClose(caed_id.substring(1,caed_id.length))
        }

        function toSelectCard(_this) {
            $this = $(_this);
            var li = $this.parent();
            var menuId = $(li).attr('mid');
            var url = $(li).attr('funurl');
            var title =$this.next().text();
            goToMessage(menuId,title,url)
        }



    </script>

